Write-observation and Read-preservation TM Correctness Invariants
نویسندگان
چکیده
A transactional memory (TM) is a concurrent object with the three read, write and commit methods. The clients of a TM are transactions, a sequence of read and write invocations that are possibly succeeded by a commit invocation. A transactional processing system is the composition of a TM and as set of clients. The clients issue the invocation events and the TM issues the response events. TM should guarantee that every concurrent execution of an arbitrary set of client transactions is indistinguishable from a sequential execution of them. Correctness conditions for TM such as opacity [7], VWC [11], and TMS1 and TMS2 [5] define the indistinguishably criterion and the set of correct histories. Considering the promised safety properties, designing a correct TM is an art. TM algorithms are subtle programs that compose a TM from a set of base concurrent objects. Their subtly makes them vulnerable. Lesani et al [14] reported bugs and fixes for a couple of previously proposed TM algorithms. Verification of TM algorithm has been a topic of recent attention. Researchers have employed model checking, automatic invariant generation and theorem proving to verify the correctness of TM algorithms. Model checkers from Cohen et al. [1, 2], and Guerraoui et al. [8–10] are the pioneering approach to verification of TM. Model checking can automate the verification process but is either based on assumptions about the TM algorithm or only scalable to a finite number of threads and locations or simplified algorithms. Later, Emmi et al. [6] tried to automatically infer invariants that are strong enough to entail the correctness criterion. Their research tackled the very central part of the problem but reported resorting to simplified algorithms due to scalability issues. Later, Lesani et al. [12] presented a machine checked theorem proving framework and a full proof of NORec TM algorithm [3]. The framework can be employed to verify realistic algorithms but requires translation of the algorithm to a transition system and more importantly, the process involves coming up with non-trivial invariants. Verification of TM algorithms has been a formidable problem in part because the target correctness criterion is a monolithic complicated condition. In an early work, Tasiran [15] presented a decomposition of the correctness condition for a specific class of algorithms. Can the correctness of TM be stated as a conjunction of simpler meaningful conditions? In other words, is there an intuitive functional decomposition of TM correctness conditions? What are the separate invariants that the TM designers should maintain? We present intuitive invariants for the correctness of TM algorithms. We say that a history is markable if there is a specific ordering relation called marking such that three invariants are satisfied. These invariants are not only required but also sufficient for opacity. We prove the equivalence of markability and opacity. Roughly speaking, the first invariant called write-observation requires that each read operation returns the most current value and the second invariant called read-preservation requires that the location which is read is not overwritten in a certain interval and the third invariant is the well-known real-time-preservation property. We will look at these invariants more closely in the next section. Separation of concerns brings modularity in understanding, design and verification. Decomposition of the correctness condition showcases different aspects of it. Separate required conditions informs designers and helps them concentrate on maintaining one condition at a time. It also allows studying the effect of separate correctness aspects on performance. In addition, separation has obvious benefits of modularity and scalability for verification. The marking relation can be defined using the execution order or the linearization order of method calls on the used base objects. Thus, proofs of markability can be aided by and mirror design intuitions. Another important property of markability statement is that it can be proved using a program logic that we are developing. We are working on a machine checked proof of markability of the TL2 [4] algorithm.
منابع مشابه
Invariants for the Construction of a Handshake Register
Tromp's construction of a waitfree atomic register for one writing process and one reading process is presented, and proved by means of ghost variables and invariants. Preservation of the invariants is proved mechanically. This approach can be compared with the original proof based on the partial order on the set of accesses of shared variables. 1 Diachrony versus synchrony In the eld of distri...
متن کاملVC3: Trustworthy Data Analytics in the Cloud
We present VC3, the first system that allows users to run distributed MapReduce computations in the cloud while keeping their code and data secret, and ensuring the correctness and completeness of their results. VC3 runs on unmodified Hadoop, but crucially keeps Hadoop, the operating system and the hypervisor out of the TCB; thus, confidentiality and integrity are preserved even if these large ...
متن کاملDecomposing Opacity
Transactional memory (TM) algorithms are subtle and the TM correctness conditions are intricate. Decomposition of the correctness condition can bring modularity to TM algorithm design and verification. We present a decomposition of opacity called markability as a conjunction of separate intuitive invariants. We prove the equivalence of opacity and markability. The proofs of markability of TM al...
متن کاملA Correctness Proof for a Byzantine-Fault-Tolerant Read/Write Atomic Memory with Dynamic Replica Membership
We prove correctness of a Byzantine-fault-tolerant replication algorithm for a read/write atomic memory that supports a dynamic replica set.
متن کاملRegional Logic for Local Reasoning about Global Invariants
Shared mutable objects pose grave challenges in reasoning, especially for data abstraction and modularity. This paper presents a novel logic for erroravoiding partial correctness of programs featuring shared mutable objects. Using a first order assertion language, the logic provides heap-local reasoning about mutation and separation, via ghost fields and variables of type ‘region’ (finite sets ...
متن کامل